<template>
  <div>
  <label><input class="mui-switch" type="checkbox"> 默认未选中</label>
  <label><input class="mui-switch" type="checkbox" checked> 默认选中</label>
  <label><input class="mui-switch mui-switch-animbg" type="checkbox"> 默认未选中,简单的背景过渡效果,加mui-switch-animbg类即可</label>
  <label><input class="mui-switch mui-switch-animbg" type="checkbox" checked> 默认选中</label>
  <label><input class="mui-switch mui-switch-anim" type="checkbox"> 默认未选中，过渡效果，加 mui-switch-anim
    类即可</label>
  <label><input class="mui-switch mui-switch-anim" type="checkbox" checked> 默认选中</label>
  </div>
</template>
<script>
    export default{}
</script>
<style>
  .mui-switch {
    width: 43px;
    height: 24px;
    position: relative;
    border: 1px solid #dfdfdf;
    background-color: #fdfdfd;
    box-shadow: #dfdfdf 0 0 0 0 inset;
    border-radius: 35px;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    background-clip: content-box;
    display: inline-block;
    -webkit-appearance: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color:#fff ;
  }
  .mui-switch:before {
    content: '';
    width: 22px;
    height: 22px;
    position: absolute;
    top: 0px;
    left: 0;
    border-radius: 22px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
  .mui-switch:checked {
    border-color: #f47c4a;
    box-shadow: #f47c4a 0 0 0 16px inset;
    background-color: #f47c4a; }
  .mui-switch:checked:before {
    left: 19px; }
  /*有一点背景过渡效果*/
  .mui-switch.mui-switch-animbg {
    transition: background-color ease 0.4s; }
  .mui-switch.mui-switch-animbg:before {
    transition: left 0.3s; }
  .mui-switch.mui-switch-animbg:checked {
    box-shadow: #b5b5b5 0 0 0 0 inset;
    background-color: #f47c4a;
    transition: border-color 0.4s, background-color ease 0.4s; }
  .mui-switch.mui-switch-animbg:checked:before {
    transition: left 0.3s; }
  .mui-switch.mui-switch-anim {
    transition: border cubic-bezier(0, 0, 0, 1) 0.4s, box-shadow cubic-bezier(0, 0, 0, 1) 0.4s; }
  .mui-switch.mui-switch-anim:before {
    transition: left 0.3s; }
  /*有背景缩小过渡效果*/
  .mui-switch.mui-switch-anim:checked {
    box-shadow: #f47c4a 0 0 0 26px inset;
    background-color: #f47c4a;
    transition: border ease 0.4s, box-shadow ease 0.4s, background-color ease .8s; }
  .mui-switch.mui-switch-anim:checked:before {
    transition: left 0.3s; }

  /*# sourceMappingURL=mui-switch.css.map */
</style>
